package com.xhtt.modules.task.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.xhtt.common.utils.DateUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 装卸船任务里面的lm任务
 * </p>
 *
 * @author feipc
 * @since 2019-03-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaskShipTaskLm {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer taskShipTaskId;

    /**
     * 靠泊时间
     */
    private LocalDateTime kb;

    /**
     * 离泊时间
     */
    private LocalDateTime lb;

    private LocalDateTime ljtg;//联检通过时间

    private LocalDateTime dlsc;//代理上船时间

    private LocalDateTime lmdl;//L/M登轮时间

    private LocalDateTime aqhy;//安全会议时间

    public void setKb(LocalDateTime kb) {
        if (DateUtils.NA_DATE.equals(kb)) {
            kb = null;
        }
        this.kb = kb;
    }

    public void setLb(LocalDateTime lb) {
        if (DateUtils.NA_DATE.equals(lb)) {
            lb = null;
        }
        this.lb = lb;
    }

    public void setLjtg(LocalDateTime ljtg) {
        if (DateUtils.NA_DATE.equals(ljtg)) {
            ljtg = null;
        }
        this.ljtg = ljtg;
    }

    public void setDlsc(LocalDateTime dlsc) {
        if (DateUtils.NA_DATE.equals(dlsc)) {
            dlsc = null;
        }
        this.dlsc = dlsc;
    }

    public void setLmdl(LocalDateTime lmdl) {
        if (DateUtils.NA_DATE.equals(lmdl)) {
            lmdl = null;
        }
        this.lmdl = lmdl;
    }

    public void setAqhy(LocalDateTime aqhy) {
        if (DateUtils.NA_DATE.equals(aqhy)) {
            aqhy = null;
        }
        this.aqhy = aqhy;
    }
}
